package com.zy.web.demo.shejimoshi.danli;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/8/19 10:35
 */
public class TestDanLi {

    public static void main(String[] args) throws Exception {
//        DanLi3 dan = DanLi3.getInstance();
//        DanLi3 dan2 = DanLi3.getInstance();
//        System.out.println(dan.hashCode());
//        System.out.println(dan2.hashCode());
//
//        Constructor<DanLi3> declaredConstructor = DanLi3.class.getDeclaredConstructor();
//        DanLi3 danLi2 = declaredConstructor.newInstance();

        DanLi7 i = DanLi7.getInstance();
        DanLi7 i2 = DanLi7.getInstance();
        System.out.println(i.hashCode());
        System.out.println(i2.hashCode());

//        Class<?> zy = DanLi2.class.getClass();
//        System.out.println(zy.hashCode());
//        DanLi7 dan = DanLi7.getInstance();
//        DanLi7 dan2 = DanLi7.getInstance();
//        System.out.println(dan.hashCode());
//        System.out.println(dan2.hashCode());
//        Constructor<DanLi7> declaredConstructor = DanLi7.class.getDeclaredConstructor();
//        DanLi7 danLi2 = declaredConstructor.newInstance();
//        System.out.println(danLi2.hashCode());
    }
}
